//
//  BQUserDao.h
//  honeycomb
//
//  Created by billionsfinance-resory on 16/2/26.
//  Copyright © 2016年 www.bqjr.cn. All rights reserved.
//

#import "BQBaseDao.h"

@interface BQUserDao : BQBaseDao
/**
 *  创建单例
 *
 *  @return 对象
 */
+ (instancetype)shareObject;


/**
 *  用户登录
 *
 *  @param userId 用户ID
 *  @param password 密码
 */
- (void)loginWithUserId:(NSString *)userId
            andPassword:(NSString *)password
andServiceReceiveResponseSuccess:(serverResponseSuccess)success
ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  用户注册
 *
 *  @param userId 用户ID
 *  @param userName 用户名
 *  @param password 密码
 *  @param mobile 用户电话号码
 */
- (void)registerWithUserId:(NSString *)userId
               andUserName:(NSString *)userName
            andPassword:(NSString *)password
                 andMobile:(NSString *)mobile
andServiceReceiveResponseSuccess:(serverResponseSuccess)success
ServiceReceiveResponseFailed:(serverResponseFailed)failed;


/**
 *  获取腾讯云COS签名
 *
 *  @param method 传到那个bucket下
 *  @param key 图片名字
 */
- (void)getTencentTokenWithMethod:(NSString *)method
                           andKey:(NSString *)key
andServiceReceiveResponseSuccess:(serverResponseSuccess)success
ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  搜索用户
 *
 *  @param searchText 搜索信息可传用户ID或者手机号
 *
 */
- (void)searchUserWithSearchText:(NSString *)searchText
 andServiceReceiveResponseSuccess:(serverResponseSuccess)success
     ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  根据用户ID查询用户信息
 *
 *  @param userId 用户ID
 *
 */
- (void)queryUserInfoWithUserId:(NSString *)userId
andServiceReceiveResponseSuccess:(serverResponseSuccess)success
    ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  更新用户信息
 *
 *  @param userId 用户ID
 *  @param userName 用户名
 *  @param userMobile 用户手机号
 *  @param portraitUri 用户头像地址
 *
 */
- (void)updateUserInfoWithUserId:(NSString *)userId
                     andUserName:(NSString *)userName
                   andUserMobile:(NSString *)userMobile
                  andPortraitUri:(NSString *)portraitUri
andServiceReceiveResponseSuccess:(serverResponseSuccess)success
   ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  修改用户密码
 *
 *  @param userId 用户ID
 *  @param originalPwd 原密码
 *  @param newPwd 新密码
 *
 */
- (void)changePasswordWithUserId:(NSString *)userId
                  andOriginalPwd:(NSString *)originalPwd
                       andNewPwd:(NSString *)newPwd
andServiceReceiveResponseSuccess:(serverResponseSuccess)success
    ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  添加好友
 *
 *  @param fId 目标的ID
 *  @param msg 问候信息
 */
- (void)addFriendWithfId:(NSString *)fId
              andMessage:(NSString *)msg
 andServiceReceiveResponseSuccess:(serverResponseSuccess)success
     ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  查询好友列表
 *
 *  @param fId 自己的ID
 */
- (void)queryFriendListWithfId:(NSString *)fId
andServiceReceiveResponseSuccess:(serverResponseSuccess)success
ServiceReceiveResponseFailed:(serverResponseFailed)failed;


/**
 *  接受好友邀请
 *
 *  @param uid 对方的ID
 */
- (void)acceptFriendInviteWithuId:(NSString *)uid
andServiceReceiveResponseSuccess:(serverResponseSuccess)success
  ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  创建群组
 *
 *  @param groupName 群组名称
 */
- (void)createGroupWithGroupName:(NSString *)groupName
                   andCreateorId:(NSString *)createorId
 andServiceReceiveResponseSuccess:(serverResponseSuccess)success
     ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  查询群组信息
 *
 *  @param groupId 群组ID
 */
- (void)queryGroupInfoWithGroupId:(NSString *)groupId
andServiceReceiveResponseSuccess:(serverResponseSuccess)success
    ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  更新群组信息
 *
 *  @param groupId 群组ID
 *  @param groupName 群组名称
 *  @param portraitUri 群组图片
 *  @param inNumber 群组人数
 *  @param maxNumber 群组最大人数
 *  @param introduce 群简介
 *  @param isJoin 是否加入
 *  @param isDismiss 是否解散
 */
- (void)updateGroupInfoWithGroupId:(NSString *)groupId
                      andGroupName:(NSString *)groupName
                    andPortraitUri:(NSString *)portraitUri
                       andInNumber:(NSString *)inNumber
                      andMaxNumber:(NSString *)maxNumber
                      andIntroduce:(NSString *)introduce
                         andIsJoin:(NSString *)isJoin
                      andIsDismiss:(NSString *)isDismiss
 andServiceReceiveResponseSuccess:(serverResponseSuccess)success
     ServiceReceiveResponseFailed:(serverResponseFailed)failed;


/**
 *  查询群组成员
 *
 *  @param groupId 群组ID
 */
- (void)queryGroupMemberListWithGroupId:(NSString *)groupId
andServiceReceiveResponseSuccess:(serverResponseSuccess)success
    ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  查询该用户加入的所有群组的信息
 *
 *  @param userId 用户ID
 */
- (void)getAllGroupInfoListWithUserId:(NSString *)userId
       andServiceReceiveResponseSuccess:(serverResponseSuccess)success
           ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  群组增加新用户
 *
 *  @param groupId 群组ID
 *  @param selectedUserIdList 要添加的成员ID集合
 */
- (void)addGroupMemberWithGroupId:(NSString *)groupId
            andSelectedUserIdList:(NSMutableArray *)selectedUserIdList
     andServiceReceiveResponseSuccess:(serverResponseSuccess)success
         ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  群组踢出用户
 *
 *  @param groupId 群组ID
 *  @param selectedUserIdList 要踢出的成员ID集合
 */
- (void)deleteGroupMemberWithGroupId:(NSString *)groupId
            andSelectedUserIdList:(NSMutableArray *)selectedUserIdList
 andServiceReceiveResponseSuccess:(serverResponseSuccess)success
     ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  解散群组
 *
 *  @param groupId 群组ID
 */
- (void)dismissGroupWithGroupId:(NSString *)groupId
    andServiceReceiveResponseSuccess:(serverResponseSuccess)success
        ServiceReceiveResponseFailed:(serverResponseFailed)failed;


/**
 *  上传图片到腾讯云
 *
 *  @param imageData 图片数据
 *  @param key 图片key值
 */
- (void)uploadImageToTenCentWithImageData:(NSData *)imageData
                                  andKey:(NSString *)key
andServiceReceiveResponseSuccess:(serverResponseSuccess)success
   ServiceReceiveResponseFailed:(serverResponseFailed)failed;


/**
 *  删除原有的图片
 *
 *  @param key 图片key值
 */
- (void)deleteImageWithKey:(NSString *)key
andServiceReceiveResponseSuccess:(serverResponseSuccess)success;


/**
 *  获取商家信息
 */
- (void)getBusinessInfoListandServiceReceiveResponseSuccess:(serverResponseSuccess)success
             ServiceReceiveResponseFailed:(serverResponseFailed)failed;

/**
 *  获取商家菜单列表
 *
 *  @param businessId 商家ID
 */
- (void)getDishesInfoListWithBusinessId:(NSString *)businessId
       andServiceReceiveResponseSuccess:(serverResponseSuccess)success
           ServiceReceiveResponseFailed:(serverResponseFailed)failed;

@end



